<?php
/* @var $this EntrepriseController */
/* @var $model Entreprise */
/* @var $form CActiveForm */
?>

<style>

div.form fieldset {
	border: none;
}
</style>

<!-- Imporation des scripts pour le BBCode (champs d'observation)  -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://cdn.wysibb.com/js/jquery.wysibb.min.js"></script>
<link rel="stylesheet" href="http://cdn.wysibb.com/css/default/wbbtheme.css" />



<div class="form well">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'entreprise-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); 

// script d'ajout du BBCode 
Yii::app()->clientScript->registerScript('wysibb', 
	'$(function() {
		var buttons = {
			buttons: "bold,italic,underline,strike,|,bullist,numlist,|,fontsize,fontcolor"
		}
		$("#Entreprise_observation").wysibb(buttons);
	});',
 CClientScript::POS_READY);

?>
	<?php echo $form->errorSummary($model); ?>
	


	<legend>Identité</legend>
	
	<div class='row'>
	
		<div class="control-group span">
			<?php echo $form->labelEx($model,'nom'); ?>
			<?php echo $form->textField($model,'nom'); ?>
			<?php echo $form->error($model,'nom'); ?>
		</div>	
			
		<div class="control-group span">
			<?php echo $form->labelEx($model,'civilite'); ?>
			<?php echo $form->textField($model,'civilite'); ?>
		</div>
		
		<div class="control-group span">
			<?php echo $form->labelEx($model,'gerant'); ?>
			<?php echo $form->textField($model,'gerant'); ?>
		</div>
			
		
	</div>
	
	
	<legend>Coordonnées</legend>
	
	<div class='row'>
	
		<div class="control-group span">
			<?php echo $form->labelEx($model,'rue'); ?>
			<?php echo $form->textField($model,'rue'); ?>
		</div>
	
		<div class="control-group span">
			<?php echo $form->labelEx($model,'cp'); ?>
			<?php echo $form->textField($model,'cp'); ?>
		</div>
	
		<div class="control-group span">
			<?php echo $form->labelEx($model,'commune'); ?>
			<?php echo $form->textField($model,'commune'); ?>
		</div>
	
		<div class="control-group span">
			<?php echo $form->labelEx($model,'telephone'); ?>
			<?php echo $form->textField($model,'telephone'); ?>
		</div>
	
		<div class="control-group span">
			<?php echo $form->labelEx($model,'fax'); ?>
			<?php echo $form->textField($model,'fax'); ?>
		</div>
	
		<div class="control-group span">
			<?php echo $form->labelEx($model,'email'); ?>
			<?php echo $form->textField($model,'email'); ?>
		</div>
		
	</div>	
	
	
	<legend>Observation</legend>
	
	<div class='row'>
	
		<div class="control-group span" style="width:90%">

			<?php /*echo $form->textArea($model,'observation',array('rows'=>3,'class'=>'span5','maxlength'=>255)); */?>
			<textarea id="Entreprise_observation" name="Entreprise[observation]" maxlength="255"><?php echo $model->observation ?></textarea>
		</div>
	
	</div>
	


	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Créer' : 'Sauvegarder', array( 'class' => 'btn', 'style' => 'float: right')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->